﻿//using System;

//using ApplicationBoilerplate.DataProvider;
//using MongoDB.Driver;

//namespace MVCBootstrap.MongoDB {

//    public class Context : IContext {
//        protected internal readonly String connectionString;
//        protected internal readonly String databaseName;

//        public Context(String connectionString, String databaseName) {
//            this.connectionString = connectionString;
//            this.databaseName = databaseName;
//        }

//        public MongoCollection GetCollection(String name) {
//            return new MongoClient(this.connectionString).GetServer().GetDatabase(this.databaseName).GetCollection(name);
//        }

//        public MongoCollection<TEntity> GetCollection<TEntity>() {
//            return new MongoClient(this.connectionString).GetServer().GetDatabase(this.databaseName).GetCollection<TEntity>("user");
//        }

//        public IRepository<TEntity> GetRepository<TEntity>() where TEntity : class {
//            return new Repository<TEntity>(this);
//        }

//        public void SaveChanges() {
//            // Nothing happening here! Changes happens real-time!
//            // No transactions!
//        }

//        public void Dispose() { }
//    }
//}